package response

import (
	"github.com/gin-gonic/gin"
	"net/http"
)

// Success 成功
func Success(c *gin.Context, h gin.H) {
	c.JSON(http.StatusOK, h)
}

// Error 失败
func Error(c *gin.Context, h gin.H) {
	c.JSON(http.StatusBadRequest, h)
}

// UnAuthError 鉴权失败时
func UnAuthError(c *gin.Context, h gin.H) {
	c.JSON(http.StatusUnauthorized, h)
}

// ForbiddenError 权限不足时
func ForbiddenError(c *gin.Context, h gin.H) {
	c.JSON(http.StatusForbidden, h)
}
